Skip to content

test(global-index): verify concurrent queries through reader wrappers - #595

Merged
SteNicholas merged 3 commits into
apache:mainfrom
lxy-9602:expose-global-index-reader
Dec 4, 2026
Merged

SteNicholas merged 3 commits into
apache:mainfrom
lxy-9602:expose-global-index-reader

Conversation

@lxy-9602

@lxy-9602 lxy-9602 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Purpose

Clarify the conditions under which a global index reader can be shared across query threads, and add regression coverage for concurrent queries through Union, LiveRow, and Offset wrappers.

Document supplier synchronization requirements and executor behavior.

Tests

  • Add vector and full-text queries from multiple threads.
  • Verify DV filtering, row-id offsets, row-specific scores, query isolation, unchanged input filters, and one-time live-row loading.
  • Verify that LiveRow reports a non-thread-safe wrapped reader correctly.

API and Format

Clarifies public API documentation without changing API signatures, storage formats, or protocols.

Documentation

Document reader concurrency requirements, nested-executor deadlock risks, and the distinction between outer query executors and Bitmap/BTree private pools.

Generative AI tooling

Generated-by: OpenAI Codex (GPT-6)

@SteNicholas SteNicholas left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lxy-9602, I left some comments for the failing clang-tidy check, the concurrency and executor contracts, and coverage of simultaneous queries. PTAL.

@SteNicholas SteNicholas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A multi-file shard can still return an exception with file visits outstanding. The inline comments cover that lifetime issue, two ways the new tests can hang, and the concurrency guarantees the tests and public documentation expose.

Comment thread docs/source/user_guide/global_index.rst Resolved
@lszskye

lszskye commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Could you point me to the code change that implements “Also handle a null executor in full-text shard searches by evaluating the shards sequentially”? The null-executor fallback in UnionGlobalIndexReader appears to already exist in the base branch.

@lszskye lszskye left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@lxy-9602

lxy-9602 commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

Could you point me to the code change that implements “Also handle a null executor in full-text shard searches by evaluating the shards sequentially”? The null-executor fallback in UnionGlobalIndexReader appears to already exist in the base branch.

When I addressed the review comments earlier, I removed it, and the PR description has been updated. Thanks!

@SteNicholas SteNicholas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@SteNicholas
SteNicholas merged commit d07992f into apache:main Dec 4, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants